﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication3
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        private void bacsiBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.bacsiBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.hospitalDataSet);

        }

        private void Form3_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'hospitalDataSet.bacsi' table. You can move, or remove it, as needed.
            this.bacsiTableAdapter.Fill(this.hospitalDataSet.bacsi);

        }

        private void button1_Click(object sender, EventArgs e)
        {
            DataRow NewRow = hospitalDataSet.Tables["bacsi"].NewRow();
            NewRow["id"] = this.textBox1.Text;
            NewRow["ten"] = this.textBox2.Text;
            hospitalDataSet.Tables["bacsi"].Rows.Add(NewRow);
        }
    }
}
